<template>
	<view>
		<view class="bg"></view>
		<view class="container">
			<view v-for="(item,index) in dataList" :key="index">
				<view class="item-bg">
					<!-- $20 -->
					<view class="price">
						￥
						<text>{{item.price}}</text>
					</view>
					<view class="detail">
						<view class="name">{{item.name}}</view>
						<view class="condition">{{item.condition}}</view>
						<view class="time">{{item.begainTime}}——{{item.endTime}}</view>
						<button :style="item.status == 1 ? 'background-color: #D9D9D9;' : ''">
							<text v-if="item.status == 0">领取</text>
							<text v-else>已领取</text>
						</button>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataList: [{
						name: '满200元可用',
						condition: '仅限于XX加油站使用',
						begainTime: '2020.04.11',
						endTime: '2023.05.11',
						price: '20',
						status: 0
					},
					{
						name: '满200元可用',
						condition: '仅限于XX加油站使用',
						begainTime: '2020.04.11',
						endTime: '2023.05.11',
						price: '20',
						status: 1
					}
				]
			}
		},
		methods: {

		}
	}
</script>

<style>
	.bg {
		height: 400rpx;
		background-color: #3486FD;
	}
	
	.container {
		background-color: #FFFFFF;
		padding: 30rpx;
		margin: 0 20rpx;
		margin-top: -350rpx;
		border-radius: 30rpx;
	}
	
	.item-bg {
		background-image: url('/static/coupon/组 5.png');
		background-repeat: no-repeat;
		width: 100%;
		height: 225rpx;
		display: flex;
		align-items: center;
		position: relative;
		margin-bottom: 30rpx;
	}
	
	.price {
		font-weight: bold;
		color: #FFFFFF;
		width: 200rpx;
		text-align: center;
		margin-right: 30rpx;
	}
	
	.price>text{
		font-size: 80rpx;
	}
	
	.name {
		color: #FF7B41;
		font-weight: bold;
		font-size: 35rpx;
		margin-bottom: 10rpx;
	}
	
	.condition {
		font-size: 16rpx;
		font-weight: bold;
		margin-bottom: 30rpx;
	}
	
	.time {
		color: #B9B3B0;
		font-size: 16rpx;
	}
	
	button {
		position: absolute;
		width: 140rpx;
		height: 60rpx;
		right: 10rpx;
		bottom: 90rpx;
		font-size: 24rpx;
		line-height: 60rpx;
		background-color: #FF6C15;
		color: #FFFFFF;
		border-radius: 50rpx;
	}
</style>